import request from '@/utils/request'

export const getAreaListAPI = (params) => request.get('/parking/area/list', { params })

export const addAreaAPI = (data) => request.post('/parking/area', data)

export const getAreaDropListAPI = () => request.get('/parking/rule/list')

export const editAreaAPI = (data) => request.put('/parking/area', {
  id: data.id,
  areaName: data.areaName,
  spaceNumber: data.spaceNumber,
  areaProportion: data.areaProportion,
  ruleId: data.ruleId,
  remark: data.remark
})

export const delAreaAPI = (id) => request.delete(`/parking/area/${id}`)
